import service from '@/utils/request'


export const useClassSubmitApi = (data: any) => {
    if (data.id) return service.put('/sys/class', data)
    else return service.post('/sys/class', data)
}

export const useGetClassInfoApi = (id: string) => {
    return service.get('/sys/class/info/' + id)

}

export const useClassSelectApi = () => {
    return service.get('/select/class')
}

export const useClassCascadeSelectApi = () => {
    return service.get('/select/class-cascade')
}

export const useClassCourserApi = (data: any) => {
    return service.get('/sys/class/list-courser', {
        params: data
    })
}

export const useSemesterCourseSaveApi = (data: any) => {
    return service.post('/sys/class/add-course', data)
}
export const useSemesterTeacherSaveApi = (data: any) => {
    return service.post('/sys/class/add-teacher', data)
}

